package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.dao.Dynamic;

import java.util.List;

@Mapper
public interface DynamicMapper {

    Integer addDynamic(Dynamic dynamic);

    Integer updateDynamic(Dynamic dynamic);

    Dynamic getDynamic(Dynamic dynamic);

    List<Dynamic> getDynamicList();

    List<Dynamic> getDynamicListByPage(Integer page, Integer size);

    @Select("SELECT COUNT(*) FROM dynamic")
    int getTotalRecords();
}
